<?php

    //    ELGG manage friends and groups page

    // Run includes
        require_once(dirname(dirname(__FILE__))."/includes.php");
        
    // Initialise functions for user details, icon management and profile management
        run("userdetails:init");
        run("profile:init");
        run("friends:init");

        define("context", "network");
        
    // Whose friends are we looking at?
        global $page_owner;
        
    // You must be logged on to view this!
        templates_page_setup();        
        $title = run("profile:display:name") . " :: ". gettext("Friends I have linked to");
			
//////////////////////////////////////////////////////////////////////////////////////////////////
// ADDED BY NDG August 26th 2006 in order to make it easier to find course communities
	// Show a list of all communities in the system.
	require_once( '../_custom/peoplelist.php');
    // Transfer into template & write.
    $body = templates_draw(array(
                    'context' => 'contentholder',
                    'title' => $title,
                    'body' => peoplelist( $page_owner) 
                )
                );
    
    echo templates_page_draw(array(
                    $title, $body
                )
                );				
?>